   package com.example.job.fragment;

   import android.annotation.SuppressLint;
   import android.os.Bundle;

   import androidx.fragment.app.Fragment;
   import androidx.recyclerview.widget.LinearLayoutManager;
   import androidx.recyclerview.widget.RecyclerView;

   import android.view.LayoutInflater;
   import android.view.View;
   import android.view.ViewGroup;
   import android.widget.EditText;
   import android.widget.ImageView;
   import android.widget.ProgressBar;

   import com.example.job.ViewModel.JobViewModel;
   import com.example.job.adapter.JobAdapter;
   import com.example.job.R;

   public class infoFragment extends Fragment {
       private ProgressBar progressBar;
       private RecyclerView recyclerView;
       private JobViewModel mainViewModel;
       private JobAdapter jobAdapter;

       @SuppressLint("MissingInflatedId")
       @Override
       public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
           // Inflate the layout for this fragment
           View view = inflater.inflate(R.layout.fragment_info, container, false);

           progressBar = view.findViewById(R.id.progressBar);
           recyclerView = view.findViewById(R.id.recyclerView);
           mainViewModel = new JobViewModel(requireContext());

           init();

           return view;
       }

       private void init() {
           progressBar.setVisibility(View.VISIBLE);
           recyclerView.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
           System.out.println(mainViewModel.load_Data());
           jobAdapter = new JobAdapter(mainViewModel.load_Data());
           recyclerView.setAdapter(jobAdapter);
           progressBar.setVisibility(View.GONE);
        }
   }
   